package com.nl.lib_project.view.androidpicker

import android.app.Activity
import android.view.View
import android.widget.LinearLayout
import com.github.gzuliyujiang.dialog.DialogConfig
import com.github.gzuliyujiang.wheelpicker.NumberPicker
import com.nl.lib_project.R

/** 作者: wangfei 创建时间: 2022/2/15 包名: com.nl.lib_project.view.androidpicker 类名: CustomNumberPicker */
class CustomNumberPicker(activity: Activity) : NumberPicker(activity) {
  override fun createHeaderView(): View? {
    return View.inflate(activity, R.layout.dialog_header_style_4, null)
  }

  override fun createFooterView(): View? {
    return null
  }

  override fun createTopLineView(): View {
    val view = View(activity)
    view.layoutParams =
        LinearLayout.LayoutParams(
            MATCH_PARENT, (0.5 * activity.resources.displayMetrics.density).toInt())
    view.setBackgroundColor(DialogConfig.getDialogColor().topLineColor())
    return view
  }
}
